<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class MomentResource extends JsonResource
{
    public function toArray($request)
    {
    	$resource = $this->resource;
        return [
        	'id' => (int)$resource->id,
	        'user_id' => (int)$resource->user_id,
	        'content' => (string)$resource->content,
	        'images' => $resource->images,
	        'likes' => $resource->likes,
	        'comments' => $resource->comments,
	        'reposts' => $resource->reposts,
	        'created_at' => (string)$resource->created_at,
        ];
    }
}
